package QL;

import java.util.List;
import java.util.ArrayList;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

public class ButlerBlockMixedInfo implements IQLResponse
{
    /// <summary>
    /// 唯一Id
    /// </summary>
    public long Id;

    /// <summary>
    /// 类型，1ip黑名单 2设备黑名单 3ip白名单 4设备白名单 5账号白名单
    /// </summary>
    public long BlockType;

    /// <summary>
    /// 对应的值
    /// </summary>
    public String BlockValue;

    /// <summary>
    /// 添加原因
    /// </summary>
    public String BlockReason;

    /// <summary>
    /// 添加人
    /// </summary>
    public String BlockOperator;

    /// <summary>
    /// 添加时间
    /// </summary>
    public String BlockTime;

    @Override
    public void DeserializeFromJson(JSONObject jsonObj)
    {
        JSONObject t = jsonObj;
        if (t.has("id"))
            Id = t.getLong("id");
        if (t.has("block_type"))
            BlockType = t.getLong("block_type");
        if (t.has("block_value"))
            BlockValue = t.getString("block_value");
        if (t.has("block_reason"))
            BlockReason = t.getString("block_reason");
        if (t.has("block_operator"))
            BlockOperator = t.getString("block_operator");
        if (t.has("block_time"))
            BlockTime = t.getString("block_time");
    }
}
